<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>旋转案例</title>
    <style>
        div{
            width: 500px;
            height:500px;
            border: 1px solid pink;
            margin: 100px auto;
            overflow: hidden;
        }
        /* 伪元素是行内元素 不能设置大小，所以要转换成块级元素  deg 是度*/
        div::before{
            content: "旋转";
            display: block;
            width: 500px;
            height: 500px;
            background-color: rgb(160, 55, 72);
            transform-origin: left bottom;
            transform: rotate(180deg);
            /* transition是改变速度的 */
            transition: all 0.1s;
        }
        div:hover::before{
            transform: rotate(0deg);
        }
    </style>
</head>
<body>
   <div></div>
</body>
</html>